package com.jic.market.enums;

/**
 * 奖品类别
 * @author MJ
 * @date: 2020/3/10
 */
public enum AwardsCategoryEnum {


    THANK_PARTICIPATE (1, "谢谢参与"),
    PRODUCT(2, "商品"),
    COUPON(3, "优惠券"),
    INTEGRAL(4, "积分"),
    ;

    private Integer code;
    private String message;

    AwardsCategoryEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public AwardsCategoryEnum getByCode(Integer code){
        AwardsCategoryEnum[] values = AwardsCategoryEnum.values();
        for(AwardsCategoryEnum value : values){
            if(value.getCode().equals(code)){
                return value;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}
